<template>
  <div class="ppt">
    <lyhHeader></lyhHeader>

    <div class="bd">
      <div class="title">卫星会日程</div>
      <img src="" alt="">
      <div class="btns">
        <div class="btn" @click="download">下载幻灯日程</div>
        <div class="btn" @click="goVote">问卷调查</div>
      </div>


    </div>

  </div>
</template>

<script>
import lyhHeader from '@/components/Header.vue'
import ajax from '@/ajax/ajax.js'
export default {
  name: 'ppt',
  data () {
    return {
      msg: 'Welcome to Your Vue.js App',
      companylist: []
    }
  },
  components: {lyhHeader},
  methods: {
    goCompany () {
      this.$router.push({name: 'Company'})
    },
    goVote () {
      const voteUrl = this.$route.params.pptVoteUrl;
      if(!voteUrl) return;
      location.href = voteUrl;
    },
    download () {
      const pptDownloadUrl = this.$route.params.pptDownloadUrl;
      if(!pptDownloadUrl) return;
      location.href = pptDownloadUrl;
    }
  },
  created () {
    console.log('swiper created')
    ajax.post('getcompanylist', {}).then(data => {
      this.companylist = data.items
    })
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="less" scoped>
  .bd {
    padding: 0 20px;

    .title {
      text-align: center;
      font-size: 16px;
      padding: 15px 0;
    }
    .btn {
      width: 100%;
      background-color: #cd0070;
      color: white;
      height: 45px;
      border-radius: 4px;
      line-height: 45px;
      text-align: center;
      margin-bottom: 8px;

      &:last-child {
        background-color: #fff;
        border:1px solid #cd0070;
        margin-bottom: 0px;
        color: #cd0070;

      }
    }
  }


</style>
